#分为两种违规等级:严重违规，普通违规，一般违规

#检测严重违规物品
execute as @a[nbt={Inventory:[{id:"minecraft:tnt"}]}] run function sdp:avoid/hardtri
execute as @a[nbt={Inventory:[{id:"minecraft:tnt_minecart"}]}] run function sdp:avoid/hardtri
execute as @a[nbt={Inventory:[{id:"minecraft:end_crystal"}]}] run function sdp:avoid/hardtri
execute as @a[nbt={Inventory:[{id:"minecraft:respawn_anchor"}]}] run function sdp:avoid/hardtri
execute as @a[nbt={Inventory:[{id:"minecraft:lava_bucket"}]},tag=!whitelist] run function sdp:avoid/hardtri
execute as @a[nbt={Inventory:[{id:"minecraft:water_bucket"}]},tag=!whitelist] run function sdp:avoid/hardtri

#检测普通违规物品
execute as @a[nbt={Inventory:[{id:"minecraft:dispenser"}]},tag=!whitelist] run function sdp:avoid/normaltri
execute as @a[nbt={Inventory:[{tag:{EntityTag:{}}}]},tag=!whitelist] run function sdp:avoid/normaltri
execute as @a[nbt={Inventory:[{tag:{BlockEntityTag:{}}}]},tag=!whitelist] run function sdp:avoid/normaltri
execute as @a[nbt={Inventory:[{tag:{AttributeModifiers:[{AttributeName:"forge:reach_distance"}]}}]},tag=!whitelist] run function sdp:avoid/normaltri

#检测对应掉落物
execute as @e[type=item,nbt={Item:{id:"minecraft:tnt"}}] at @s run function sdp:avoid/itemtri
execute as @e[type=item,nbt={Item:{id:"minecraft:tnt_minecart"}}] at @s run function sdp:avoid/itemtri
execute as @e[type=item,nbt={Item:{id:"minecraft:end_crystal"}}] at @s run function sdp:avoid/itemtri
execute as @e[type=item,nbt={Item:{id:"minecraft:respawn_anchor"}}] at @s run function sdp:avoid/itemtri
execute as @e[type=item,nbt={Item:{id:"minecraft:lava_bucket"}}] at @s run function sdp:avoid/itemtri
execute as @e[type=item,nbt={Item:{tag:{BlockEntityTag:{}}}}] at @s run function sdp:avoid/itemtri
execute as @e[type=item,nbt={Item:{tag:{Fireworks:{}}}}] at @s run function sdp:avoid/itemtri

#检测对应实体
execute as @e[type=tnt] at @s run function sdp:avoid/entitytri
execute as @e[type=tnt_minecart] at @s run function sdp:avoid/entitytri
execute as @e[type=end_crystal] at @s run function sdp:avoid/entitytri
execute as @e[type=wither] at @s run function sdp:avoid/entitytri
execute as @e[type=ender_dragon] at @s run function sdp:avoid/entitytri
#execute as @e[type=firework_rocket,nbt={FireworksItem:{tag:{Fireworks:{}}}}] at @s run function sdp:avoid/itemtri
